package c.c.k.emums;


import lombok.Getter;

import java.util.Arrays;

@Getter
public enum EnumSuggestionType {
    P00(1, "空仓", "p00"),
    P20(2, "+20%", "p20"),
    P50(3, "+30%", "p50"),
    P100(4, "+50%", "p100"),
    ;

    private int value;
    private String desc;
    private String color;

    private EnumSuggestionType(int value, String desc, String color){
        this.value = value;
        this.desc = desc;
        this.color = color;
    }

    public static EnumSuggestionType getType(int value){
        return Arrays.stream(EnumSuggestionType.values()).filter(s->s.getValue()==value).findAny().get();
    }
}
